<div id="agent_policy_search_div"></div>
<script>
    Ext.onReady(function(){
        var agentLoginID = new Ext.form.TextField({
            fieldLabel: '代理商登录ID',
            //allowBlank: false,
            name: 'agent_login_id',
            width: 100,
            anchor: '90%'
        });
        var searchButton = new Ext.Button({
            text: '搜 索',
            handler: searchByAgentLoginID
        })
        var formPanel = new Ext.form.FormPanel({
            //baseCls: 'x-plain',
            labelWidth: 75,
            width: '500',
            labelAlign: 'right',
            frame: true,
            items: [{
                    layout: 'column',
                    border: false,
                    items: [{
                            columnWidth: .4,
                            layout: 'form',
                            border: false,
                            items: [agentLoginID]
                        },{
                            columnWidth: .1,
                            layout: 'form',
                            border: false,
                            items: [searchButton]
                        }]
                }]
        });
        formPanel.render('passenger_search_div');
        function searchByAgentLoginID(){
            if (formPanel.form.isValid()) {
                commonPriceReleasedListDS.baseParams.agent_login_id = agentLoginID.getValue();
                commonPriceReleasedListDS.load({
                    params: {
                        start: 0,
                        limit: 10
                    }
                });
                commonPriceReleasedListDS.baseParams.agent_login_id = null;
            }
            //alert();
        }
    });
</script>